// 使用 Math.floor 函数可以舍弃小数部分、保留整数部分
let month = Math.floor(Math.random() * 12);
console.log( month );

switch (month) {
  case 2:
    console.log("28天或29天");
    break;
  case 4:
  case 6:
  case 9:
  case 11:
    console.log("30天");
    break;
  case 1:
  case 3:
  case 5:
  case 7:
  case 8:
  case 10:
  case 12:
    console.log("31天");
    break;
  default:
    console.log("月份错误");
}
